﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Dm.filter.log;

using Microsoft.AspNetCore.Mvc.Rendering;

using OOS.Application.User.Services.Dtos;
using OOS.Application.User.Services.Vos;
using OOS.Core.RelyOn;
using OOS.Core.User;

namespace OOS.Application.User.Services.Interfaces
{
    /// <summary>
    /// 用户管理
    /// </summary>
    public interface IUserBasicService
    {
        /// <summary>
        /// 新增用户信息
        /// </summary>
        /// <param name="userBasic"></param>
        /// <returns></returns>
        bool InsertUserBasic(UserBasic userBasic);

        /// <summary>
        /// 根据Id查询查询数据详情(Id->name)
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        UserBasicDto SelectUserById(int id);

        /// <summary>
        /// 根据id修改用户信息(包含修改密码操作)
        /// </summary>
        /// <param name="userBasic"></param>
        /// <returns></returns>
        bool UpdateUserBasicById(UserBasic userBasic);

        /// <summary>
        /// 按条件(用户名模糊查询，登录账号模糊查询，用户状态精确查询,用户类型精确查询)分页查询
        /// </summary>
        /// <param name="userBasic"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        PageResponseDto<List<UserBasicDto>> SelectByContitionsByPage(UserBasic userBasic, int pageIndex, int pageSize);

        /// <summary>
        /// 根据id删除用户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DeleteUserBasicById(int id);

        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="loginVo"></param>
        /// <param name="flag">
        /// true,PC端用户登录
        /// false,移动端用户登录
        /// </param>
        /// <returns></returns>
        LoginDto Login(LoginVo loginVo,Boolean flag);
        /// <summary>
        /// 用户注册
        /// </summary>
        /// <param name="loginVo"></param>
        /// <returns></returns>
        LoginDto Register(LoginVo loginVo);
    }
}
